package ru.spbau.goncharova.chat.client.clientMessages;

import ru.spbau.goncharova.chat.protocol.MessageType;
import ru.spbau.goncharova.chat.protocol.ProtocolFlags;
import ru.spbau.goncharova.chat.protocol.ProtocolHeader;

import java.nio.ByteBuffer;

public class FetchRequestMessage extends ClientMessage {

    public FetchRequestMessage(int state) {
        data = new byte[Integer.SIZE / Byte.SIZE];
        ByteBuffer buffer = ByteBuffer.wrap(data).order(ProtocolHeader.order).putInt(state);
        header = new ProtocolHeader(new ProtocolFlags(0), MessageType.FETCH_REQUEST, data);
    }
}
